<?php
/**
 * GioCMS
 * 
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@ninhgio.com so we can send you a copy immediately.
 * 
 * @copyright	Copyright (c) 2010 Gio CMS (http://www.ninhgio.com)
 * @license		http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * 
 */
?>
<?php echo '<?xml version="1.0" encoding="utf-8"?>'; ?>
<rss version="2.0">
  <channel>
    <title><?php echo $this->TRANSLATOR->translator('common_default_title', 'core'); ?></title>
    <description><?php echo $this->TRANSLATOR->translator('common_default_title', 'core'); ?></description>
    <link><?php echo $this->url('news_rss_index'); ?></link>
    <copyright><?php echo $this->APP_WEB_NAME; ?></copyright>
    <generator><?php echo $this->APP_WEB_NAME; ?>:<?php echo $this->url('news_rss_index'); ?></generator>
	<pubDate><?php echo $this->buildDate; ?></pubDate>
    <lastBuildDate><?php echo $this->buildDate; ?></lastBuildDate>
    	<?php if (isset($this->articles) && $this->articles) : ?>
    	<?php foreach ($this->articles as $index => $article) : ?>
		<item>
			<title><![CDATA[<?php echo $article['title']; ?>]]></title>
			<description><![CDATA[<?php echo strip_tags($article['description']); ?>]]></description>
			<link><?php echo $this->url('news_article_details', $article); ?></link>
			<pubDate><?php echo date('D, d M Y h:i:s', strtotime($article['created_date'])); ?> GMT</pubDate>
		</item>
		<?php endforeach; ?>
		<?php endif; ?>
  </channel>
</rss>
